package Timer;

import java.util.Comparator;

public class demo1 {
    public static void main(String[] args) {
        MyTimer myTimer = new MyTimer();
        myTimer.schedule(()->{
            System.out.println("Hello " + Thread.currentThread().getName());
        },3000);

        myTimer.schedule(()->{
            System.out.println("Hello " + Thread.currentThread().getName());
        },2000);

        myTimer.schedule(()->{
            System.out.println("Hello " + Thread.currentThread().getName());
        },1000);

    }

}
